#include <iostream>
using namespace std;
int main()
{
	string str,cur,ret;
	cin>>str;
	for(int i=0;i<=str.size();i++)
	{
		if(str[i]>='0'&&str[i]<='9')
		{
			cur+=str[i];
		}
		else
		{
			if(ret.size()<cur.size())
			{
				ret=cur;
			}
			else
			{
				cur.clear();
			}
		}
	}
	cout<<ret<<end;
 } 
